package com.hubiao.pro.service.impl;

import com.hubiao.pro.common.constant.Constants;
import com.hubiao.pro.common.redis.Cache;
import com.hubiao.pro.service.RedisStringService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Description
 *
 * @author hubiao
 * @since 2021-01-29 14:32
 */

@Service
public class RedisStringServiceImpl implements RedisStringService {

    @Resource
    private Cache cache;

    /**
     * 计数器
     */
    @Override
    public void incr() {
        cache.incrBy( Constants.KEY_STR, 1L );
    }


}
